public function editProduct($idProduct) {
        $data['msg'] = NULL;
        $data['data']=$this->Msanpham->get_One($idProduct);
        if(isset($_REQUEST["save"])) {

            $this -> Msanpham -> updateProduct($data, $idProduct);
            $config = array('upload_path'   => 'public\frontend\upload',
                'allowed_types' => 'gif|jpg|png',
                'max_size'      => '2000');

            
            $this->load->library("upload",$config);
            //echo('</br>issest ='.isset($_FILES['img']));
            //echo('</br>empty = '.empty($_FILES['img']));
            //echo('</br>is_null = '.is_null($_FILES['img']));
            if (!empty($_FILES['img'])) {
                echo('khong file');
                $data_edit = array(
                   'sanpham_Ten' => $this->input->post('productName'),
                   'sanpham_Gia' => $this->input->post('productPrice')
                );
            } else {
                if(!$this->upload->do_upload("img")){
                    $arrayErrors= array($this->upload->display_errors());
                    $data['msg']  =  "<div class='error'>".$arrayErrors[0]."</div>";
                    $this->admin_layout->view("admin/productnew",$data);
                }else{
                    $image_data = $this->upload->data();

                    $config = array("source_image" => $image_data['full_path'],
                        "new_image" => "C:/wamp/www/DienThoai213/public/frontend/sanpham",
                        "maintain_ration" => true,
                        "width" => '140',
                        "height" => "105");
                    $this->load->library("image_lib",$config);
                    $this->image_lib->resize();

                    $data_edit = array(
                       'sanpham_Ten' => $this->input->post('productName'),
                       'sanpham_Gia' => $this->input->post('productPrice'),
                       'sanpham_HinhAnh' => $image_data['orig_name']
                    );

                }

            }
            var_dump($data_edit);
            //$this -> Msanpham -> updateProduct($data_edit, $idProduct);
            //redirect('admin/products');
        } else {
            $this->admin_layout->view("admin/productedit",$data);
        }
    }